﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="AddComments.aspx.vb" Inherits="Nokia_Smartphones.AddComments" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    </p>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:PhonesConn %>"
        ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" SelectCommand="SELECT DISTINCT [TagName], [ID] FROM [PhoneTagView] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
            CellPadding="4" ForeColor="#333333" GridLines="None" HorizontalAlign="Center"
            Style="margin-top: 0px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Model_Number" HeaderText="Number" SortExpression="Model_Number" />
                <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
                <asp:HyperLinkField DataNavigateUrlFields="PostCode" DataNavigateUrlFormatString="http://maps.google.co.uk/?q={0}"
                    DataTextField="PostCode" HeaderText="Recommended Retail Stores" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">
                    <ControlStyle Width="500px" />
                <HeaderStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Image">
                    <ControlStyle CssClass="phoneImageBig" />
                </asp:ImageField>
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PhonesConn %>"
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" SelectCommand="SELECT [Model_Number], [Price], [Picture], [PostCode], [Description] FROM [Phones] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="1" Name="?" QueryStringField="ID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <asp:CheckBoxList ID="cblTags" runat="server" DataSourceID="SqlDataSource3" DataTextField="TagName"
        DataValueField="TagID" RepeatDirection="Horizontal">
    </asp:CheckBoxList>
    <p>
        <strong>Add Tag Separated By Comma</strong></p>
    <p>
        <asp:TextBox ID="tb_AddTag" runat="server" CssClass="textbox"></asp:TextBox>
    </p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:PhonesConn %>"
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" SelectCommand="SELECT [TagID], [TagName] FROM [Tags] ORDER BY [TagName]">
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="btn_AddTag" runat="server" Text="Add Tag" />
    </p>
    <asp:Rating BorderWidth="0" BorderStyle="Solid" Width="129px" Height="29px" ID="Rating"
        CurrentRating="1" runat="server" StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar"
        EmptyStarCssClass="emptyRatingStar" FilledStarCssClass="filledRatingStar" MaxRating="5">
    </asp:Rating>
    <asp:Button ID="btn_SaveRating" runat="server" Text="Save Rating" />
    <p>
        <strong>Average Rating</strong> :&nbsp;
        <asp:Label ID="lblAverageRatings" runat="server" Text="Label"></asp:Label>
    </p>
    <p>
        <strong>User Opinions and Reviews</strong></p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2"
            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
            CellPadding="4" ForeColor="Black" GridLines="Horizontal">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="Subject" HeaderText="Subject" SortExpression="Subject" />
                <asp:BoundField DataField="Message" HeaderText="Message" SortExpression="Message">
                    <ControlStyle Width="300px" />
                </asp:BoundField>
                <asp:BoundField DataField="Comment_Date" HeaderText="Comment Date" SortExpression="Comment_Date" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F7F7F7" />
            <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
            <SortedDescendingCellStyle BackColor="#E5E5E5" />
            <SortedDescendingHeaderStyle BackColor="#242121" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PhonesConn %>"
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" SelectCommand="SELECT [Author], [Subject], [Message], [Comment_Date] FROM [Comments] WHERE ([PhoneID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="?" QueryStringField="ID" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <br />
        <strong>Add Your Comment</strong><br />
        <br />
        Subject
        <br />
        <asp:TextBox ID="tb_Subject" runat="server" Width="282px" CssClass="textbox"></asp:TextBox>
        <br />
        <br />
        Your Comment
        <br />
        <asp:TextBox ID="tb_Message" runat="server" Height="85px" TextMode="MultiLine" Width="278px"
            CssClass="textbox"></asp:TextBox>
    </p>
    <br />
    <br />
    <br />
    <br />
    <br />
    <p>
        <br />
        <asp:Button ID="btn_Save" runat="server" Text="Save Comment" />
        <br />
        <br />
    </p>
    <p>
    </p>
    <p>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <br />
    <br />
    <br />
</asp:Content>
